package com.zh.netty;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @Description:
 * @ClassName TestAlibaba
 * @date: 2021.03.11 10:41
 * @Author: zhanghang
 */
public class TestAlibaba {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("1");
        list.add("2");
        Iterator<String> iterator = list.iterator();
        while (iterator.hasNext()) {
            String item = iterator.next();
            if (item.equals("2")) {
                iterator.remove();
            }
        }
        list.forEach(System.out::println);
        String userId = "";

    }
}
